Skip to content

PENDING: phy: qcom: Fix PCIe PHY regulator voting causing suspend/resume crash - #1562

Closed
Hariharan Sreedhar (hariharan-sree) wants to merge 3 commits into
qualcomm-linux:qcom-7.3from
hariharan-sree:pcie-phy-reg-voting-fix
Closed

Hariharan Sreedhar (hariharan-sree) wants to merge 3 commits into
qualcomm-linux:qcom-7.3from
hariharan-sree:pcie-phy-reg-voting-fix

Conversation

@hariharan-sree

Copy link
Copy Markdown

The Nord PCIe PHY common block (vdda-phy-a/vdda-pll-a) was not being
voted when only a subset of ports (B/C/D) were enabled, and two Nord
boards had the vdda-pll-b/c/d-supply regulators mis-mapped onto the
same rail as vdda-pll-a. With the PHY's common/PLL supplies left
improperly voted, accessing the DBI register space during
suspend/resume causes a crash.

  • phy-qcom-qmp-pcie-multiphy.c: add vdda-phy-a/vdda-pll-a to the
    port B/C/D/CD/BCD regulator lists so the shared common-block supply
    is always voted regardless of which ports are active.
  • nord-ride-embedded.dts: fix vdda-pll-b/c/d-supply to point at
    vreg_l2e_0p9 instead of being aliased to vreg_l1e_0p9
    (vdda-pll-a's rail).
  • nord-rrd.dts: same regulator fix, plus removal of a duplicate
    &pcie_phy/&pcie0..3 override block further down in the file
    that re-applied the stale vreg_l1e_0p9 mapping via devicetree
    node merging, silently undoing the fix.

…es for all lane configs

The regulator lists for port B, C, D, CD and BCD only contained the
per-lane vdda-phy-x/vdda-pll-x supplies and never included the shared
vdda-phy-a/vdda-pll-a rails that back the common PCS/common block.

When a board enables only ports B, C or D (or a combination that does
not include port A), the shared vdda-phy-a/vdda-pll-a regulators are
never voted. The PHY common block, which backs the DBI register
space, is therefore left improperly powered. Accessing the DBI
registers from that under-voted rail during suspend/resume crashes.

Add vdda-phy-a and vdda-pll-a to the port B/C/D/CD/BCD regulator
lists so the shared supply is always voted whenever any of these
ports is active.

Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com>
…ply regulator mapping

vdda-pll-b-supply, vdda-pll-c-supply and vdda-pll-d-supply were
incorrectly mapped to vreg_l1e_0p9, the same rail already used by
vdda-pll-a-supply. With all four PLL rails tied to a single
regulator, the PHY's PLL supplies for lanes B/C/D are not voted on
their actual hardware regulator, leaving the PCIe PHY improperly
powered. This causes crashes when the DBI register space is
accessed during suspend/resume.

Point vdda-pll-b/c/d-supply at vreg_l2e_0p9, matching the board's
actual regulator assignment.

Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com>
…nd drop duplicate override

vdda-pll-b-supply, vdda-pll-c-supply and vdda-pll-d-supply were
incorrectly mapped to vreg_l1e_0p9, the same rail already used by
vdda-pll-a-supply, leaving the PCIe PHY's PLL supplies improperly
voted. Point them at vreg_l2e_0p9, matching the board's actual
regulator assignment.

The file also carried a second, duplicate &pcie_phy / &pcie0.. &pcie3
and &pcie0_port0.. &pcie3_port0 override block further down with the
same stale vdda-pll-b/c/d-supply = vreg_l1e_0p9 mapping. Since
devicetree merges same-labeled fragments in file order, this later
block silently re-applied the wrong mapping on top of the fix,
leaving the PHY under-voted and causing crashes when the DBI
register space is accessed during suspend/resume.

Drop the duplicate override block so the corrected mapping sticks.

Signed-off-by: Hariharan Sreedhar <hariharan.sreedhar@oss.qualcomm.com>
@qcomlnxci

Copy link
Copy Markdown

Test results

Workflow run: 45825700353 attempt 1

Known failures configured: 0

Target Pass Non-pass Total
kbdev-glymur-crd-multimedia 31 5 36

Test Matrix

Test Case kbdev-glymur-crd-multimedia
LAVA result ✅ Results
Audio_Card_Registration ✅ Pass
BT_FW_KMD_Service ✅ Pass
BT_ON_OFF ✅ Pass
BT_SCAN ✅ Pass
CPUFreq_Validation ✅ Pass
CPU_affinity ✅ Pass
DSP_AudioPD ✅ Pass
Ethernet_Basic_Validation ⚠️ skip
Freq_Scaling ✅ Pass
GIC ✅ Pass
IPA ✅ Pass
Interrupts ✅ Pass
KVM_Driver ✅ Pass
KVM_EL2_DTB ✅ Pass
KVM_Infra ✅ Pass
OpenCV ✅ Pass
PCIe ✅ Pass
Probe_Failure_Check ❌ Fail
RMNET ✅ Pass
UFS_Validation ⚠️ skip
USBHost ✅ Pass
WiFi_Firmware_Driver ✅ Pass
WiFi_OnOff ✅ Pass
adsp_remoteproc ✅ Pass
cdsp_remoteproc ✅ Pass
gpdsp_remoteproc ⚠️ skip
hotplug ✅ Pass
irq ✅ Pass
kaslr ✅ Pass
pinctrl ✅ Pass
qcom_hwrng ✅ Pass
rngtest ✅ Pass
shmbridge ✅ Pass
smmu ❌ Fail
watchdog ✅ Pass
wpss_remoteproc ✅ Pass
Failure summary

Unexpected failures

  • kbdev-glymur-crd-multimedia: gpdsp_remoteproc => skip.
  • kbdev-glymur-crd-multimedia: Probe_Failure_Check => fail.
  • kbdev-glymur-crd-multimedia: smmu => fail.
  • kbdev-glymur-crd-multimedia: UFS_Validation => skip.
  • kbdev-glymur-crd-multimedia: Ethernet_Basic_Validation => skip.

Result: blocked because unexpected failures were found.

@qlijarvis

Copy link
Copy Markdown

LAVA Failed Case Triage Summary

PR: #1562

Job 295038 | SoC glymur-qli-crd

LAVA job: https://lava-oss.qualcomm.com/scheduler/job/295038

Failed test cases in LAVA job 295038 (SoC: glymur-qli-crd).

  Case 1: Probe_Failure_Check
  1. Failed case: Probe_Failure_Check
  2. Root cause: Pre-existing audio codec (wsa_macro) register access failures during ASoC component initialization on glymur-crd; two WSA macro codecs (6c90000.codec and 6cb0000.codec) fail to update register 0x5dc with -EIO error, unrelated to PR's PCIe PHY regulator changes
  3. Possible fix: Investigate wsa_macro driver power sequencing and clock dependencies for glymur platform; verify WSA codec power supplies and clocks are correctly configured in glymur device tree; PR changes (PCIe PHY regulators for nord boards) do not affect glymur audio subsystem
  4. Detail analysis attachment: failed_case_job295038_1_detailed.md
  Case 2: smmu
  1. Failed case: smmu
  2. Root cause: Video codec device aa00000.video-codec is missing IOMMU group attachment in the device tree — the device probed successfully but was never added to any IOMMU group during boot, causing the SMMU validation test to fail when checking for critical master IOMMU protection.
  3. Possible fix: Add the missing iommus property to the aa00000.video-codec device tree node in arch/arm64/boot/dts/qcom/nord.dtsi (or the appropriate glymur-crd DTS file) to bind the video codec to an IOMMU group, following the pattern used by other platform devices like GPU (3d00000.gpu) and display (ae00000.display-subsystem).
  4. Detail analysis attachment: failed_case_job295038_2_detailed.md
  Case 3: 0_qcom-next-ci-premerge-tests
  1. Failed case: 0_qcom-next-ci-premerge-tests
  2. Root cause: LAVA test harness marked the test definition as "unfinished" after all tests completed successfully; the test runner exited normally with <LAVA_TEST_RUNNER EXIT> but LAVA's dispatcher logged "Marking unfinished test run as failed" and set result to fail.
  3. Possible fix: Re-trigger the LAVA job; this is a known LAVA infrastructure race condition where the test harness fails to recognize test completion despite receiving the EXIT signal — if the issue persists, review the LAVA job definition's test completion detection logic and ensure proper signal handling for the test runner exit.
  4. Detail analysis attachment: failed_case_job295038_3_detailed.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants